home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 025a / gsdb25.zip / DB_XPL01.PAS < prev    next >
Pascal/Delphi Source File  |  1990-11-27  |  1KB  |  29 lines

  1. program DB_Xpl01;
  2. uses
  3.    CRT,
  4.    DOS,
  5.    GS_dBFld,
  6.    GS_dBase;
  7. var
  8.    Health  : GS_dBFld_Objt;       {object of type GS_dBFld_Objt}
  9.  
  10. begin
  11.    ClrScr;
  12.    Health.Init('HEALTH');         {Initialize object using the dBase III}
  13.                                   {file HEALTH.DBF.  Extension assumed}
  14.    Health.Open;                   {Open the object's file}
  15.    Health.GetRec(Top_Record);     {Get the first record in the file}
  16.    while not Health.File_EOF do   {Repeat until end-of-file}
  17.    begin
  18.       writeln(Health.FieldGet('FOOD'),'   ',
  19.               Health.FieldGet('CALS'),'   (',
  20.               Health.FieldGet('FOOD_CODE'),')');
  21.                                       {Displays three fields.  Each field is}
  22.                                       {retrieved by passing the field name to}
  23.                                       {objectname.Formula                   }
  24.  
  25.       Health.GetRec(Next_Record); {Get the next sequential record}
  26.    end;
  27.    Health.Close;                  {Close the dBase III file}
  28. end.
  29.